import { BASE_URL } from '@/settings'
import request from '@/utils/request'

// 检查考勤打卡
export function checkPunchReq(data){
  return request({
    url: `${BASE_URL}/hr/api/v1/attendPunch/checkPunch`,
    method: 'post',
    data: data
  })
}

// 考勤打卡
export function punchReq(data){
  return request({
    url: `${BASE_URL}/hr/api/v1/attendPunch/punch`,
    method: 'post',
    data: data
  })
}

// 外出打卡
export function outPunchReq(data){
  return request({
    url: `${BASE_URL}/hr/api/v1/attendGoOut/punch`,
    method: 'post',
    data: data
  })
}

// 查询考勤打卡记录
export function findPunchRecordReq(date){
  return request({
    url: `${BASE_URL}/hr/api/v1/attendPunchAppStat/findPunchRecord?dateYmd=${date}`,
    method: 'GET'
  })
}

export function selectAttendYearMonth(data){
  return request({
    url: `${BASE_URL}/hr/api/v1/attendPunchRecords/selectAttendYearMonth`,
    method: 'get',
    data: data
  })
}